home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
earcd
/
devel
/
vbcc-68k-src
/
machines
/
amiga68k
/
libsrc
/
minstart.s
< prev
next >
Wrap
Text File
|
1999-01-01
|
867b
|
36 lines
; minimal startup code
;
; If You use this You may not use most functions from vc.lib.
; Also DOSBase and SysBase will not be set up.
; You can only call exit().
; main() should be declared like this:
; int main(char *commandline); or int main(void);
section "CODE",code
xref _main
xdef _exit
xdef _SysBase
near a4,-2
initnear
move.l 4.w,_SysBase(a4); set up SysBase
move.l a7,InitialSP(a4); Stack merken
clr.b -1(a0,d0) ; 0 ans Ende
move.l a0,-(a7) ; an main uebergeben
jsr _main
moveq #0,d0 ; EXIT_SUCCESS, if exit() wasn't called
bra.b exit
_exit
move.l 4(a7),d0 ; Returnwert setzen
exit
move.l InitialSP(a4),a7; Stack zuruecksetzen
rts
section "__MERGED",data
InitialSP
dc.l 0
_SysBase
dc.l 0